package com.king.designpatterns.结构型模式.组合模式;

/**
 * 叶子节点
 *
 * @author king
 * @date 2021-06-08 13:50
 */
public class Employee implements Company{
    /**
     * 姓名
     */
    private String name;
    /**
     * 职位
     */
    private String position;
    /**
     * 薪水
     */
    private int salary;

    public Employee(String name, String position, int salary) {
        this.name = name;
        this.position = position;
        this.salary = salary;
    }

    @Override
    public String getInfo(){
        String info = "名称：" + this.name + "\t职位：" + this.position + "\t薪水" + this.salary;
        return info;
    }
}
